<template>
	<div>
		<div class="main">
			<div @click="$router.push('/chapter')" style="cursor: pointer;">返回</div>
			<div style="font-size: 1.25rem;font-weight: 18.75;">章节测试</div>
			<div style="background-color:#90b3bc;height: 3.25rem;width: 3.25rem;" @click="addChapterTest1()">完成</div>
		</div>
		<div style="margin-left: 1.25rem;margin-right: 1.25rem;">
			<div>
				<Creat></Creat>
			</div>
		</div>
	</div>
</template>

<script>
	import {
		addChapterTest
	} from "../../../../../api/education/courseware.js";
	import Creat from "../../../../CreateTest/CreateTest.vue"
	export default {
		components: {
			Creat: Creat
		},
		data() {
			return {
				Itemid:this.$route.query.Id
			}
		},
		methods: {
			addChapterTest1() {
			   alert(this.Itemid);
				var parmas = {
					periodId: this.Itemid,
					testPaperId:localStorage.getItem("TestId")
				}
				addChapterTest(parmas).then(e=>{
					console.log(e);
					this.$router.push('/chapter');
				})
				
			}
		}

	}
</script>

<style scoped="scoped">
	.main {
		width: 100%;
		height: 3.25rem;
		line-height: 3.25rem;
		display: flex;
		justify-content: space-between;
		color: white;
		text-align: center;
		cursor: pointer;
		background-color: #03d3bd;
		/* position: fixed; */
		overflow: hidden;
	}

	.main>div {

		margin-left: 20px;
		margin-right: 1.25rem;
	}
</style>
